package com.xtck.ha.system.api;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.xtck.ha.common.core.constant.ServiceNameConstants;
import com.xtck.ha.common.core.domain.R;
import com.xtck.ha.common.domain.system.api.HisTelemetryParam;
import com.xtck.ha.system.api.factory.RemoteHealthDataFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zhouss
 * @date 2024/11/21
 **/
@FeignClient(contextId = "remoteHealthDataService", value = ServiceNameConstants.HEALTH_DATA_SERVICE, fallbackFactory = RemoteHealthDataFallBackFactory.class)
public interface RemoteHealthDataService {

    @GetMapping("/xw-health-data-mgr/v1.0/healthData/api/getSpinner")
    public R<JSONObject> getSpinner();

    @PostMapping("/xw-health-data-mgr/v1.0/healthData/api/manualCalculation")
    public R<JSONArray> manualCalculation(@RequestBody HisTelemetryParam hisTelemetryParam);

}
